package com.cjw.mapper.livesquare;

import com.cjw.pojo.dto.livesquare.LiveSharingDTO;
import com.cjw.pojo.query.livesquare.QueryAllDTO;
import com.cjw.pojo.entity.livesquare.LiveSharing;
import com.cjw.pojo.query.livesquare.AddLoveCollectionQuery;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.common.special.InsertUseGeneratedKeysMapper;

import java.util.Date;
import java.util.List;

/**
 * @create_time: 2021.11.15
 * @author : cjw
 * @descipe: 生活分享mapper
 */
@Repository
public interface LiveSharingMapper extends Mapper<LiveSharing>, InsertUseGeneratedKeysMapper<LiveSharing> {
    List<LiveSharingDTO> queryAllLiveDTO(QueryAllDTO query);

    Integer addLoveCollection(AddLoveCollectionQuery query);

    LiveSharingDTO queryLiveDTO(@Param("id") Long id, @Param("begin") Integer begin, @Param("size") Integer size);

    Integer getCountByDate(@Param("date")Date date);
}
